﻿Public Class addNumbers
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub addValues_Click(sender As Object, e As EventArgs) Handles addValues.Click

        result.Text = addNumbers(value1.Text, value2.Text)


    End Sub

    Private Function addNumbers(ByVal value1Str As String, ByVal value2Str As String) As String

        Dim value1, value2, result As Single

        value1 = CSng(value1Str)
        value2 = CSng(value2Str)

        result = value1 + value2

        Return CStr(result)

    End Function

End Class